import { configureStore } from '@reduxjs/toolkit';
import user from './modules/user'
import account from './modules/account'
import * as userFu from './modules/user'
import logger from 'redux-logger';
export const store = configureStore({
        reducer: {
            user,
            account
        },
        middleware: (getDefaultMiddleware) => {
            return [logger].concat(getDefaultMiddleware())
        }
    })
    // console.log("store-getState", store.getState())
    // store.dispatch(userFu.setName('王五'))
    // store.dispatch({
    //     type: 'user/setName',
    //     payload: { id: 1, name: 'aaa' }
    // })
    // setTimeout(() => {
    //     console.log("store-getState", store.getState())
    //     store.dispatch(userFu.setName('王五'))
    // }, 1000)